4D Chart v13

CT SET HIGHLIGHT

Home

 
4D Chart v13
CT SET HIGHLIGHT

CT SET HIGHLIGHT 


 

CT SET HIGHLIGHT ( area ; scope ; first ; last ) 
Parameter Type   Description
area  Longint in 4D Chart area
scope  Longint in -1 = First object in a document 0 = First object in selection >0 = Object ID
first  Integer in Position of first character minus 1
last  Integer in Position of last character

The CT SET HIGHLIGHT command highlights characters within the text object in area described by scope.

  • If scope equals -1, CT SET HIGHLIGHT highlights characters in the first object of the document.
  • If scope equals 0, CT SET HIGHLIGHT highlights characters in the first selected object.
  • If scope is greater than 0, it must be equal to a specific text object’s ID and characters within that text object are highlighted. If the object does not exist, CT SET HIGHLIGHT does nothing. CT SET HIGHLIGHT causes the object described by scope to become the only object selected in area.

If the object described by scope is not a text object, CT SET HIGHLIGHT does nothing.

first and last determine which characters are highlighted. first is one less than the first character position to be highlighted. last is the last character position to be highlighted. If first equals last, no characters are selected and the insertion point is between first and first +1. If last is greater than the number of characters in the text object, CT SET HIGHLIGHT highlights characters to the end of the text object.

CT SET HIGHLIGHT does not highlight only part of a reference. If any portion of a reference is highlighted, CT SET HIGHLIGHT adjusts the highlight to include the entire reference.

Example  

This example gets the text of the selected text object and looks for the name “4th Dimension”. If “4th Dimension” is found, it is highlighted and then made bold.

 $Find :=Position("4th Dimension";$Text)
 If($Find #0)
    CT SET HIGHLIGHT(Area;0;$Find -1;$Find +12)
    CT SET TEXT ATTRIBUTES(Area;-3;-1;-1;1;-1;-1)
 End if

 
PROPERTIES 

Product: 4D Chart
Theme: CT Objects
Number: 14600

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Chart 1

 
SEE ALSO 

CT GET HIGHLIGHT